package cn.kgc.blog.service.impl;

import cn.kgc.blog.dao.BlogMapper;
import cn.kgc.blog.pojo.Blog;
import cn.kgc.blog.service.BlogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("blogService")
public class BlogServiceImpl implements BlogService {
    @Resource
    private BlogMapper blogMapper;

    @Override
    public List<Blog> selectAll(int userid) {
        return blogMapper.selectAll(userid);
    }

    @Override
    public int add(Blog blog) {
        return blogMapper.add(blog);
    }

    @Override
    public int delete(int id,int userid) {
        return blogMapper.delete(id,userid);
    }
}
